import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:mtf/app/modules/evaluate_detail_module/evaluate_detail_controller.dart';
import 'package:webview_flutter/webview_flutter.dart';

import '../../theme/app_colors.dart';
import '../../widget/AppBarLeftTitle.dart';
/**
 * GetX Template Generator - fb.com/htngu.99
 * */

class evaluateDetailPage extends GetView<evaluateDetailController> {
  @override
  Widget build(BuildContext context) {
    var title = Get.arguments["title"];
    var time = Get.arguments["time"];
    var cover = Get.arguments["cover"];
    return Scaffold(
      appBar: AppBarLeftTitle(
        title: "详情",
      ),
      body: Container(
        color: Colors.white,
        padding: EdgeInsets.symmetric(horizontal: 10),
        child: SingleChildScrollView(
          child: Column(
            children: [
              Padding(
                padding: const EdgeInsets.only(top: 20),
                child: Text(title,
                    style: TextStyle(
                        color: c_333333,
                        fontSize: 18,
                        fontWeight: FontWeight.bold)),
              ),
              Container(
                  margin: EdgeInsets.only(top: 5),
                  child: Text(time,
                      style: TextStyle(color: c_999999, fontSize: 12))),
              // Image.network(cover ?? "https://via.placeholder.com/108x72",
              //     width: double.infinity, height: 216, fit: BoxFit.cover),
              Obx(() {
                return Container(
                  height: controller.heightObx.value.toDouble(), width: double.infinity, child: WebViewWidget(
                  controller: controller.controller,
                ),);
              })
            ],
          ),
        ),
      ),
    );
  }
}
